package com.jd.basic.exception;

/**
 * 自定义错误码
 */
public enum ErrorCode {
    SYSTEM_ERROR("500","系统内部错误！"),
    DEPT_PARENT_ERROR("5001","上级部门错误！");
    // 错误码
    private String code;
    // 错误信息
    private String message;

    ErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message + "["+code+"]";
    }
}
